<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
  <style type="text/css"></style>
 </head>
 <body>
	<input type="text" name="" id="txt" />
	<h1 id="content"></h1>
	<script type="text/javascript">
		let oTxt = document.getElementById('txt');
		let oContent = document.getElementById('content');
		var obj = {};
		Object.defineProperty(obj,'data', {
			set: function(val) {
				oContent.innerHTML = val;
			},
			get: function(){

			}
		})
		oTxt.addEventListener('input', function() {
			obj.data = this.value;
		})
	</script>
 </body>
</html>
